package com.scx.engine.convert;

import org.bson.Document;
import com.scx.constant.Common;
import com.scx.engine.convert.interf.IConverter;
import com.scx.engine.convert.interf.impl.MysqlConverter;

/**
 * 
 * ParseSqlFactory  
 * <p>转换工厂。</p> 
 * @author sunChangXing
 * @version v1.0.0
 * <p><B>last update </B> by sunChangXing @ 2018年1月9日</p>
 * @since v1.0.0
 */
public class ParseSqlFactory {
	
	public Document build(String databaseType, String databaseName, String sql) throws Exception {
		IConverter iConverter = null;
		switch (databaseType) {
		case Common.MYSQL:
			iConverter = new MysqlConverter(databaseName);
			break;
		default:
			break;
		}
		return iConverter.getDoc(sql);
	}
}
